home *** CD-ROM | disk | FTP | other *** search
- unit USave;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Tempunit, ComCtrls, StdCtrls, Buttons, OleCtrls, CELLLib_TLB, ExtCtrls,main;
-
- type
- TFSave = class(TTemplate)
- BitBtn2: TBitBtn;
- BitBtn3: TBitBtn;
- OpenDialog1: TOpenDialog;
- SaveDialog1: TSaveDialog;
- procedure BitBtn2Click(Sender: TObject);
- procedure BitBtn3Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- FSave: TFSave;
-
- implementation
-
- {$R *.DFM}
-
- procedure TFSave.BitBtn2Click(Sender: TObject);
- begin
- inherited;
- if OpenDialog1.Execute then
- begin
- if Cell1.DoOpenFile(OpenDialog1.FileName)<=0 then
- messagedlg('File open failer, please check again!', mtInformation,[mbOk], 0);
- end;
- end;
-
- procedure TFSave.BitBtn3Click(Sender: TObject);
- begin
- inherited;
- if SaveDialog1.Execute then
- begin
- if Cell1.DoSaveFile(SaveDialog1.FileName)<=0 then
- messagedlg('File open failer, please check again!', mtInformation,[mbOk], 0);
-
- end;
- end;
-
- end.
-